﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Areas/Admin/Views/Shared/AdminMaster.master" Inherits="System.Web.Mvc.ViewPage<Eacademy.Domain.Models.QuestionViewModel>" %>

<asp:Content ID="Content3" ContentPlaceHolderID="ScriptContent" runat="server">
<script type="text/javascript">
    $(document).ready(function () {
        $("input:radio").click(function () {
            $("input:radio").removeAttr("checked");
            $(this).attr('checked', true);
        });
    });
</script>
</asp:Content>


<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Add Questions
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Add Question</h2>
    <% using (Html.BeginForm("Add", "Questions", FormMethod.Post, new { autocomplete = "off" }))
       {%>
    <div class="forms-elements">
        <div class="form-wrapper">
            <div class="form-label">
                <%: Html.LabelFor(model => model.Question)%>
            </div>
            <div class="form-element">
                <div class="textbox-xmedium-form">
                    <%: Html.TextBoxFor(model => model.Question, new { @class = "textbox-xmedium-field" })%>
                </div>
            </div>
            <div class="form-error form-error-150">
                <%: Html.ValidationMessageFor(model => model.Question)%>
            </div>
        </div>
        <div style="clear: both;">
        </div>
        <div id="schedule-list">
            <% for (int i = 0; i < Model.Choices.Count; i++)
               { %>
            <%: Html.EditorFor(model => model.Choices[i])%>
            <% } %>
        </div>
        <div class="form-wrapper">
            <div class="form-label">
            </div>
            <div class="form-element">
                <%: Html.HiddenFor(model => model.QuizId) %>
                <%: Html.HiddenFor(model => model.SubjectId) %>
                <input type="submit" value="Add Question" class="button-style"/>
            </div>
        </div>
    </div>
    <% } %>
</asp:Content>
